using System.IO;

namespace Be.Timvw.Framework.IO
{
    public static class StreamHelper
    {
        public static void Copy(Stream input, Stream output, int bufferSize)
        {
            byte[] buffer = new byte[bufferSize];
            int bytesRead;

            while((bytesRead = input.Read(buffer, 0, bufferSize)) > 0)
            {
                output.Write(buffer, 0, bytesRead);
            }
        }
    }
}